<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <!-- 查询区域 -->
    <div class="table-page-search-wrappe">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="姓名">
              <a-input placeholder="请输入姓名" v-model="queryParam.name"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="身份证号码">
              <a-input placeholder="请输入身份证号码" v-model="queryParam.idCardNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="在职状态">
              <j-dict-select-tag
                :disabled="!!query"
                v-model="queryParam.employeeStatus"
                dictCode="employee_status"
                placeholder="请选择在职状态"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="部门">
              <j-select-depart placeholder="请选择部门" v-model="queryParam.departId"/>
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="职位">
              <j-search-select
                v-model="queryParam.post"
                dict="sys_position,name,id,del_flag = 0 and audit_status=2"
              />
<!--              <j-dict-select-tag-->
<!--                placeholder="请选择职位"-->
<!--                v-model="queryParam.post"-->
<!--                dictCode="sys_position,name,id"/>-->
            </a-form-item>
          </a-col>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <a-form-item label="工号">
              <a-input placeholder="请输入工号" v-model="queryParam.employeeNo"></a-input>
            </a-form-item>
          </a-col>
          <template v-if="toggleSearchStatus">
            <a-col :xl="11" :lg="11" :md="11" :sm="24">
              <a-form-item label="入职日期">
                <j-date placeholder="请选择开始日期" class="query-group-cust" v-model="queryParam.queryJoinDateStart"></j-date>
                <span class="query-group-split-cust"></span>
                <j-date placeholder="请选择结束日期" class="query-group-cust" v-model="queryParam.queryJoinDateEnd"></j-date>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="团队名称">
                <select-team-input
                  :multi="true"
                  placeholder="请选择团队"
                  v-model="queryParam.teamIdList"
                  :query-type="'parent'"
                  :teamType="0"
                  :tdlx="3"/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24">
              <a-form-item label="参保单位" :labelCol="{xs: { span: 24 },sm: { span: 5 }}" :wrapperCol="{xs: { span: 24 },sm: { span: 12 }}">
                <select-company-input placeholder="请选择参保单位" :multi="true" v-model="queryParam.companyIdList"/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="!!query&&!!query.gender">
              <a-form-item label="性别">
                <j-dict-select-tag v-model="queryParam.gender"
                                   disabled
                                   dictCode="gender"
                                   placeholder="请选择性别"/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24"
                   v-if="!!query&&(!!query.queryInterviewDateStart||!!query.queryInterviewDateEnd)">
              <a-form-item label="面试时间">
                <a-input v-if="!query.queryInterviewDateStart&&!!query.queryInterviewDateEnd"
                         :value="'截止 ' + query.queryInterviewDateEnd" disabled/>
                <a-input v-if="!!query.queryInterviewDateStart&&!!query.queryInterviewDateEnd"
                         :value="query.queryInterviewDateStart + '至' + query.queryInterviewDateEnd" disabled/>
                <a-input v-if="!!query.queryInterviewDateStart&&!query.queryInterviewDateEnd"
                         :value="query.queryInterviewDateStart + ' 至今'" disabled/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="!!query&&!!query.ageStart">
              <a-form-item label="年龄段">
                <!-- <a-input :value="query.ageStart+'-'+query.ageEnd" disabled></a-input> -->
                <a-input :value="query.label" disabled/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="!!query&&!!query.highestDegree">
              <a-form-item label="学历">
                <j-dict-select-tag v-model="queryParam.highestDegree"
                                   disabled
                                   dictCode="highest_degree"
                                   placeholder="请选择性别"/>
              </a-form-item>
            </a-col>
            <a-col :xl="6" :lg="7" :md="8" :sm="24" v-if="!!query&&(!!query.companyAgeStart||!!query.companyAgeEnd)">
              <a-form-item label="司龄">
                <a-input :value="query.label" disabled></a-input>
              </a-form-item>
            </a-col>
          </template>
          <a-col :xl="6" :lg="7" :md="8" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
              <a @click="handleToggleSearch" style="margin-left: 8px">
                {{ toggleSearchStatus ? '收起' : '展开' }}
                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
              </a>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button type="primary" icon="download" @click="handleExportXls('花名册')"
                :disabled="isDisabledAuth('erpReportHrEmployee:export')">导出
      </a-button>

      <a-popover title="自定义列" trigger="click" placement="leftBottom">
        <template slot="content">
          <a-checkbox-group @change="onColSettingsChange" v-model="settingColumns" :defaultValue="settingColumns">
            <a-row>
              <template v-for="(item,index) in defColumns">
                <template v-if="item.key!='rowIndex'&& item.dataIndex!='action'">
                  <a-col :span="12">
                    <a-checkbox :value="item.dataIndex">{{ item.title }}</a-checkbox>
                  </a-col>
                </template>
              </template>
            </a-row>
          </a-checkbox-group>
        </template>
        <a style="float: right;">
          <a-icon type="setting" :style='iconStyle'/>
        </a>
      </a-popover>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
        style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>

      <a-table
        ref="table"
        size="middle"
        :scroll="{x:'180%'}"
        :components="draggableComponent"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
        class="j-table-force-nowrap"
        :customRow="customRow"
        @change="handleTableChange">
        <template slot="status" slot-scope="status">
          <a-badge :status="status | statusTypeFilter" :text="status | statusFilter"/>
        </template>
        <template slot="htmlSlot" slot-scope="text">
          <div v-html="text"></div>
        </template>
        <template slot="imgSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
          <img v-else :src="getImgView(text)" height="25px" alt=""
               style="max-width:80px;font-size: 12px;font-style: italic;"/>
        </template>
        <template slot="fileSlot" slot-scope="text">
          <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
          <a-button
            v-else
            :ghost="true"
            type="primary"
            icon="download"
            size="small"
            @click="downloadFile(text)">
            下载
          </a-button>
        </template>

        <span slot="action" slot-scope="text, record">
            <a-button
              class="ruleButton"
              :ghost="true"
              type="primary"
              icon="edit"
              @click="handleEdit(record)"
              :disabled="isDisabledAuth('erpReportHrEmployee:edit')"
            />
        <a-divider type="vertical"/>
        <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
            <a-button
              class="ruleButton"
              :ghost="true"
              type="primary"
              icon="delete"
              :disabled="isDisabledAuth('erpReportHrEmployee:delete')"/>
        </a-popconfirm>
        </span>
        <span slot="link" slot-scope="text, record">
          <a :title="text" @click.stop="handleClick(record)">{{ text }}</a>
        </span>
      </a-table>
    </div>

  </a-card>
</template>

<script>

import '@/assets/less/TableExpand.less'
import {mixinDevice} from '@/utils/mixin'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
import {DisabledAuthFilterMixin} from '@/mixins/DisabledAuthFilterMixin'
import {filterMultiDictText, initDictOptions} from '@/components/dict/JDictSelectUtil'
import SelectCustomerInput from '@/views/scy/components/SelectCustomerInput'
import SelectCompanyInput from '@/views/scy/components/SelectCompanyInput'
import SelectTeamInput from '@/views/scy/components/SelectTeamInput'
import JSearchSelect from '@views/erp/hr/apply/modules/JSearchSelect.vue'

export default {
  name: 'ErpReportHrEmployeeList',
  mixins: [JeecgListMixin, mixinDevice, DisabledAuthFilterMixin],
  components: {
    SelectCustomerInput,
    SelectCompanyInput,
    SelectTeamInput,
    JSearchSelect
  },
  props: {
    //流程表单data
    query: {
      type: Object,
      default: () => {
      },
      required: false
    },
  },
  watch: {
    // 在职人员查询条件
    query: {
      immediate: true,
      handler(val) {
        console.log("监听弹窗查询条件：", val)
        if (!!val) {
          // 清除全部查询条件 把本次弹窗的条件塞进去
          this.queryParam = JSON.parse(JSON.stringify(val));
          if(!!val.params.queryJoinDateStart){
            // 入职日期
            this.$set(this.queryParam, 'queryJoinDateStart', val.params.queryJoinDateStart)
          }
          if(!!val.params.queryJoinDateEnd){
            // 入职日期
            this.$set(this.queryParam, 'queryJoinDateEnd', val.params.queryJoinDateEnd)
          }
          if(!!val.params.teamIdList){
            // 团队名称
            this.$set(this.queryParam, 'teamIdList', val.params.teamIdList)
          }
          if(!!val.params.companyIdList){
            // 参保单位
            this.$set(this.queryParam, 'companyIdList', val.params.companyIdList)
          }
          console.log("this.queryParam",this.queryParam)

          // 只查询已入职的
          this.$set(this.queryParam, 'employeeStatus', '1')
          this.searchQuery()
        }
      }
    }
  },
  data() {
    return {
      description: '花名册管理页面',
      //表头
      columns: [],
      //列设置
      settingColumns: [],
      // 列定义
      defColumns: [
        {
          title: '序号',
          dataIndex: '',
          key: 'rowIndex',
          width: 60,
          align: "center",
          customRender: function (t, r, index) {
            return parseInt(index) + 1;
          }
        },
        {
          title: '工号',
          align: "center",
          dataIndex: 'employeeNo',
          width: 150,
          ellipsis: true,
        },
        {
          title: '部门',
          align: "center",
          width: 150,
          dataIndex: 'departId',
          customRender: (text, r) => {
            if (!text) {
              return ''
            } else {
              return this.parseMultiDict(text, 'sysDepart')
            }
          },
          ellipsis: true,
        },
        {
          title: '职位',
          align: "center",
          dataIndex: 'posts',
          width: 150,
          ellipsis: true,
        },
        {
          title: '姓名',
          align: "center",
          dataIndex: 'name',
          width: 150,
          ellipsis: true,
          scopedSlots: {
            customRender: 'link'
          },
        },
        {
          title: '身份证号码',
          align: "center",
          dataIndex: 'idCardNo',
          width: 150,
          ellipsis: true,
        },
        {
          title: '性别',
          align: "center",
          dataIndex: 'gender_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '出生日期',
          align: "center",
          dataIndex: 'birthDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '年龄',
          align: "center",
          dataIndex: 'age',
          width: 150,
          ellipsis: true,
        },
        {
          title: '手机',
          align: "center",
          dataIndex: 'mobile',
          width: 150,
          ellipsis: true,
        },
        {
          title: '政治面貌',
          align: "center",
          dataIndex: 'politicalLandscape_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '入职日期',
          align: "center",
          dataIndex: 'joinDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '转正日期',
          align: "center",
          dataIndex: 'probationEndDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '职工类别',
          align: "center",
          dataIndex: 'employeeType_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '职等薪级',
          align: "center",
          dataIndex: 'salaryGrade',
          width: 150,
          ellipsis: true,
        },
        {
          title: '基本工资（元）',
          align: "center",
          dataIndex: 'baseSalary',
          width: 150,
          ellipsis: true,
        },
        {
          title: '预发绩效（元）',
          align: "center",
          dataIndex: 'preMerits',
          width: 150,
          ellipsis: true,
        },
        {
          title: '学历',
          align: "center",
          dataIndex: 'highestDegree_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '毕业院校',
          align: "center",
          dataIndex: 'graduatedFrom',
          width: 150,
          ellipsis: true,
        },
        {
          title: '专业',
          align: "center",
          dataIndex: 'major',
          width: 150,
          ellipsis: true,
        },
        {
          title: '毕业时间',
          align: "center",
          dataIndex: 'graduationDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '职称或证书',
          align: "center",
          dataIndex: 'certificateName',
          width: 150,
          ellipsis: true,
        },
        {
          title: '紧急联系人',
          align: "center",
          dataIndex: 'linkTel',
          width: 150,
          ellipsis: true,
        },
        {
          title: '籍贯',
          align: "center",
          dataIndex: 'nativePlace',
          width: 150,
          ellipsis: true,
        },
        {
          title: '身份证住址',
          align: "center",
          dataIndex: 'idCardAddress',
          width: 150,
          ellipsis: true,
        },
        {
          title: '现住址',
          align: "center",
          dataIndex: 'currentAddress',
          width: 150,
          ellipsis: true,
        },
        {
          title: '民族',
          align: "center",
          dataIndex: 'national_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '婚姻状况',
          align: "center",
          dataIndex: 'maritalStatus_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '合同开始时间',
          align: "center",
          dataIndex: 'beginDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '劳动合同结束时间',
          align: "center",
          dataIndex: 'endDate',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: '社保缴纳归属',
          align: "center",
          dataIndex: 'insuredUnit_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '社保缴纳基数（元）',// 2022年12月6日11:19:12 htt企业微信添加需求+单位
          align: "center",
          dataIndex: 'insuredBase',
          width: 160,
          ellipsis: true,
        },
        {
          title: '公积金缴纳归属',
          align: "center",
          dataIndex: 'providentFundUnit_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '公积金缴纳基数（元）',// 2022年12月6日11:19:12 htt企业微信添加需求+单位
          align: "center",
          dataIndex: 'providentFundBase',
          width: 160,
          ellipsis: true,
        },
        {
          title: '开户行',
          align: "center",
          dataIndex: 'bankName',
          width: 150,
          ellipsis: true,
        },
        {
          title: '卡号',
          align: "center",
          dataIndex: 'bankCard',
          width: 150,
          ellipsis: true,
        },
        {
          title: '工龄',
          align: "center",
          dataIndex: 'workAge',
          width: 150,
          ellipsis: true,
        },
        {
          title: '离职时间',
          align: "center",
          dataIndex: 'resignTime',
          width: 150,
          ellipsis: true,
          customRender: function (text) {
            return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text)
          }
        },
        {
          title: ' 在职周期',
          align: "center",
          dataIndex: 'companyAge',
          width: 150,
          ellipsis: true,
        },
        {
          title: ' 离职性质',
          align: "center",
          dataIndex: 'resignType_dictText',
          width: 150,
          ellipsis: true,
        },
        {
          title: '离职原因',
          align: "center",
          dataIndex: 'resignReason',
          width: 150,
          ellipsis: true,
        }
      ],
      url: {
        list: "/api/erp/hr/report/employee/erpReportHrEmployee/list",
        exportXlsUrl: "/api/erp/hr/report/employee/erpReportHrEmployee/exportXls",
      },
      dictOptions: {},
      superFieldList: [],
    }
  },
  created() {
    this.initDictConfig();
    this.getSuperFieldList();
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    },
  },
  methods: {
    // table 双击查看详情
    customRow(record) {
      return {
        on: {
          // 事件
          dblclick: event => {
            this.handleDetail(record)
          }
        }
      }
    },
    // 跳转详情
    handleDetail: function (record) {
      this.handleClick()
      // const _path = this.$route.path
      // this.$router.push({
      //   path: `/hr/report/employee/ErpReportHrEmployeeListDetail/${record.id}`
      // })
    },
    // 初始化字典值
    initDictConfig() {
      initDictOptions('sys_depart,gradation_show,id').then((res) => {
        if (res.success) {
          this.$set(this.dictOptions, 'sysDepart', res.result)
        }
      })
    },
    getSuperFieldList() {
      let fieldList = [];
      fieldList.push({type: 'string', value: 'employeeNo', text: '工号', dictCode: ''})
      fieldList.push({type: 'string', value: 'departId', text: '部门', dictCode: ''})
      fieldList.push({type: 'string', value: 'posts', text: '职位', dictCode: ''})
      fieldList.push({type: 'string', value: 'name', text: '姓名', dictCode: ''})
      fieldList.push({type: 'string', value: 'idCardNo', text: '身份证号码', dictCode: ''})
      fieldList.push({type: 'string', value: 'gender', text: '性别', dictCode: 'gender'})
      fieldList.push({type: 'int', value: 'age', text: '年龄', dictCode: ''})
      fieldList.push({type: 'string', value: 'mobile', text: '手机号', dictCode: ''})
      fieldList.push({type: 'string', value: 'politicalLandscape', text: '政治面貌', dictCode: ''})
      fieldList.push({type: 'date', value: 'joinDate', text: '入职日期'})
      fieldList.push({type: 'date', value: 'probationEndDate', text: '转正日期'})
      fieldList.push({type: 'string', value: 'employeeType', text: '职工类型', dictCode: ''})
      fieldList.push({type: 'string', value: 'salaryGrade', text: '职等薪级', dictCode: ''})
      fieldList.push({type: 'string', value: 'baseSalary', text: '基本工资（元）', dictCode: ''})
      fieldList.push({type: 'string', value: 'preMerits', text: '预发绩效（元）', dictCode: ''})
      fieldList.push({type: 'string', value: 'highestDegree', text: '学历', dictCode: ''})
      fieldList.push({type: 'string', value: 'graduatedFrom', text: '毕业院校', dictCode: ''})
      fieldList.push({type: 'string', value: 'major', text: '专业', dictCode: ''})
      fieldList.push({type: 'date', value: 'graduationDate', text: '毕业时间'})
      fieldList.push({type: 'string', value: 'certificateName', text: '职称或证书', dictCode: ''})
      fieldList.push({type: 'string', value: 'linkTel', text: '紧急联系人', dictCode: ''})
      fieldList.push({type: 'string', value: 'nativePlace', text: '籍贯', dictCode: ''})
      fieldList.push({type: 'string', value: 'idCardAddress', text: '身份证地址', dictCode: ''})
      fieldList.push({type: 'string', value: 'currentAddress', text: '现居地详细地址', dictCode: ''})
      fieldList.push({type: 'string', value: 'national', text: '民族', dictCode: ''})
      fieldList.push({type: 'string', value: 'maritalStatus', text: '婚姻状况', dictCode: ''})
      fieldList.push({type: 'string', value: 'beginDate', text: '合同开始时间', dictCode: ''})
      fieldList.push({type: 'string', value: 'endDate', text: '劳动合同结束时间', dictCode: ''})
      fieldList.push({type: 'string', value: 'insuredUnit', text: '社保缴纳归属', dictCode: ''})
      fieldList.push({type: 'string', value: 'insuredBase', text: '社保缴纳基数(元)', dictCode: ''})
      fieldList.push({type: 'string', value: 'providentFundBase', text: '公积金缴纳基数(元)', dictCode: ''})
      fieldList.push({type: 'string', value: 'bankName', text: '开户行', dictCode: ''})
      fieldList.push({type: 'string', value: 'bankCard', text: '卡号', dictCode: ''})
      fieldList.push({type: 'string', value: 'workAge', text: '工龄', dictCode: ''})
      fieldList.push({type: 'string', value: 'companyAge', text: ' 在职周期', dictCode: ''})
      fieldList.push({type: 'string', value: 'resignType', text: '离职类型', dictCode: ''})
      fieldList.push({type: 'string', value: 'resignReason', text: '离职原因', dictCode: ''})
      this.superFieldList = fieldList
    },
    // 解析多个值逗号拼接的字典值
    parseMultiDict(text, dictCode) {
      let values = text.split(",")
      let valueString = ''
      let count = 0;
      values.forEach(value => {
        valueString += filterMultiDictText(this.dictOptions[dictCode], value + '')
        // 倒数第一个不拼接逗号
        if (count++ < values.length - 1) {
          valueString += ","
        }
      })
      return valueString;
    },
    // 跳转至员工档案
    handleClick(record) {
      this.$router.push({
        path: '/schedule',
        query: {
          id: record.id,
          applyId: record.applyId
        }
      })
    },
    // 重置查询
    searchReset() {
      console.log("重置查询",this.query)
      if(!this.query||(!!this.query&&!this.query.params)||(!!this.query&&!!this.query.params&&!this.query.params.queryJoinDateStart)) {

        // 入职日期
        this.$set(this.queryParam, 'queryJoinDateStart', null)
      }
      if(!this.query||(!!this.query&&!this.query.params)||(!!this.query&&!!this.query.params&& !this.query.params.queryJoinDateEnd)){
        // 入职日期
        this.$set(this.queryParam, 'queryJoinDateEnd', null)
      }
      if(!this.query||(!!this.query&&!this.query.params)||(!!this.query&&!!this.query.params&& !this.query.params.teamIdList)){
        // 团队名称
        this.$set(this.queryParam, 'teamIdList', null)
      }
      if(!this.query||(!!this.query&&!this.query.params)||(!!this.query&&!!this.query.params&& !this.query.params.companyIdList)){
        // 参保单位
        this.$set(this.queryParam, 'companyIdList', null)
      }
      if(!this.query){
        // 在职状态
        this.$set(this.queryParam, 'employeeStatus', null)
      }
      // 部门
      this.$set(this.queryParam, 'departId', null)
      // 职位
      this.$set(this.queryParam, 'post', null)
      // 工号
      this.$set(this.queryParam, 'employeeNo', null)
      // 姓名
      this.$set(this.queryParam, 'name', null)
      // 身份证号码
      this.$set(this.queryParam, 'idCardNo', null)
      this.loadData(1)
    }
  }
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>
